require('log')
require('model.dog')
require('system')
require('app')
TAG = 'ALog'
function onMain()
    log.i(TAG, "onMain")
    --主线程挂起
    log.i(TAG, "sleep before");

    --system.sleep(1000)
    --log.i(TAG, "sleep after");
    --app.findPa
    local name = app.getPackageName('QQ')
    log.i(TAG, "getPackageName:" .. name);
    if (name == '')
    then
        log.i(TAG, "该应用不存在:" .. name);
    else
        app.toast('该应用存在包名:'..name);
        --local  isInstall = app.launch(name)
        --log.i(TAG, 'isInstall:' .. isInstall);
    end

end

--function onAppCreate()
--    --
--        ALog.i('ALog','onAppCreate');
--end
--print(ALog.i('ALog','from lua'))


